1 TADPOLE and ROC PLOTS

1.0.1 Loading the libraries

library("FRESA.CAD")
library(survival)
library(readxl)
library(igraph)
op <- par(no.readonly = TRUE)
pander::panderOptions('digits', 3)
pander::panderOptions('table.split.table', 400)
pander::panderOptions('keep.trailing.zeros',TRUE)

1.1 Loading ALL Results

load("~/GitHub/SurvivalTadpole/RMDS/TADPOLE_BESS_Results.RData")
load("~/GitHub/SurvivalTadpole/RMDS/TADPOLE_LASSO_Results.RData")
load("~/GitHub/SurvivalTadpole/RMDS/TADPOLE_BSWIMS_Results.RData")


par(op)


survmtest <- cvLASSORaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinLASSO <- predictionStats_binary(survmtest[,c(2,3)],"LASSO: MCI to  AD Conversion")


survmtest <- cvRIDGERaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinRIDGE <- predictionStats_binary(survmtest[,c(2,3)],"RIDGE: MCI to  AD Conversion")


survmtest <- cvBESSRaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinBESS <- predictionStats_binary(survmtest[,c(2,3)],"BESS:BIC: MCI to  AD Conversion")


survmtest <- cvBESSERaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinBESSEBIC <- predictionStats_binary(survmtest[,c(2,3)],"BESS:EBIC: MCI to  AD Conversion")


survmtest <- cvBESSGSERaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]
prBinBESSGS <- predictionStats_binary(survmtest[,c(2,3)],"BESS:GS: MCI to  AD Conversion")


survmtest <- cvBSWiMSRaw$survMedianTest
survmtest <- survmtest[complete.cases(survmtest),]

prBinBSWiMS <- predictionStats_binary(survmtest[,c(2,3)],"MCI to  AD Conversion")


par(new=TRUE)
plot(prBinLASSO$ROC.analysis$roc.predictor,col="red")
par(new=TRUE)
plot(prBinRIDGE$ROC.analysis$roc.predictor,col="pink")
par(new=TRUE)
plot(prBinBESS$ROC.analysis$roc.predictor,col="blue")
par(new=TRUE)
plot(prBinBESSEBIC$ROC.analysis$roc.predictor,col="cyan")
par(new=TRUE)
plot(prBinBESSGS$ROC.analysis$roc.predictor,col="gold")
legend("bottomright",
       legend=c("BSWiMS","LASSO","RIDGE","BIC","EBIC","BS"),
       lty=1,
       col=c("black","red","pink","blue","cyan","gold"),cex=0.85)

1.2 Summary tables

1.2.1 MCI to Dementia table


selFeatures <- names(cvBSWiMSRaw$featureFrequency[cvBSWiMSRaw$featureFrequency>5])

clusterFeatures <- fc$names


tableMCI_to_Dem <- sm$coefficients[clusterFeatures,
                                   c("Estimate",
                                     "lower",
                                     "HR",
                                     "upper",
                                     "full.AUC",
                                     "Delta.AUC",
                                     "z.IDI",
                                     "Frequency")]

nugget <- fc$membership
names(nugget) <- clusterFeatures

tableMCI_to_Dem$Cluster <- nugget[rownames(tableMCI_to_Dem)]
tableMCI_to_Dem$CVFreq <- cvBSWiMSRaw$featureFrequency[clusterFeatures]

rnames <- clusterFeatures[str_detect(clusterFeatures,"ST")]
frnames <- rnames
rnames <- str_replace_all(rnames,"M_","")
rnames <- str_replace_all(rnames,"RD_","")
rnames <- str_replace_all(rnames,"Ba_","")
rnames <- str_replace_all(rnames,"De_","")
description <- character()

for (ddet in c(1:length(rnames)))
{
  description <- c(description,TADPOLE_D1_D2_Dict$TEXT[str_detect(TADPOLE_D1_D2_Dict$FLDNAME,rnames[ddet])][1])
}
names(description) <- frnames

tableMCI_to_Dem$Description <- description[rownames(tableMCI_to_Dem)]
pander::pander(tableMCI_to_Dem)
  Estimate lower HR upper full.AUC Delta.AUC z.IDI Frequency Cluster CVFreq Description
FAQ 2.46e-01 1.273 1.581 1.963 0.800 0.032788 4.22 1.00 1 50 NA
RAVLT_immediate -3.44e-01 0.400 0.527 0.695 0.800 0.013008 5.36 1.00 1 50 NA
ABETA -2.08e-01 0.541 0.679 0.853 0.800 -0.007637 3.76 1.00 1 49 NA
M_ST56SA -2.16e-01 0.586 0.693 0.819 0.797 0.008198 4.31 1.00 1 12 Surface Area of LeftSuperiorFrontal
ADAS13 1.24e-01 1.130 1.501 1.993 0.808 -0.000754 2.44 0.90 1 48 NA
PTAU 1.38e-02 1.165 1.399 1.680 0.798 0.007735 3.44 0.90 1 48 NA
TAU 3.14e-01 1.224 1.465 1.753 0.793 0.010720 4.37 0.80 2 45 NA
M_ST13TA -2.04e-01 0.572 0.659 0.760 0.794 0.027437 5.44 0.75 1 16 Cortical Thickness Average of LeftBankssts
ADAS11 1.91e-01 1.463 1.789 2.189 0.782 0.025417 5.96 0.65 2 44 NA
RD_ST34CV -8.86e-02 0.683 0.779 0.888 0.806 0.020088 3.90 0.65 1 20 Volume (Cortical Parcellation) of LeftIsthmusCingulate
RD_ST49SA -8.66e-02 0.699 0.804 0.925 0.800 0.007946 2.95 0.65 1 5 Surface Area of LeftPostcentral
M_ST29SV -1.17e-01 0.500 0.643 0.826 0.782 0.005547 3.69 0.60 2 29 Volume (WM Parcellation) of LeftHippocampus
APOE4 3.15e-01 1.357 2.063 3.136 0.777 0.011835 3.41 0.60 2 28 NA
M_ST56CV -2.26e-02 0.694 0.782 0.881 0.775 0.007591 2.79 0.55 2 13 Volume (Cortical Parcellation) of LeftSuperiorFrontal
M_ST11SV -1.56e-01 0.625 0.736 0.868 0.784 0.013446 3.66 0.45 2 13 Volume (WM Parcellation) of LeftAccumbensArea
M_ST14TS 5.94e-02 1.094 1.252 1.433 0.782 0.007519 3.07 0.40 2 7 Cortical Thickness Standard Deviation of LeftCaudalAnteriorCingulate
RD_ST34SA -1.02e-01 0.619 0.750 0.911 0.780 0.016271 2.80 0.35 2 4 Surface Area of LeftIsthmusCingulate
M_ST59SA -8.52e-02 0.645 0.754 0.883 0.782 -0.000775 3.96 0.30 2 5 Surface Area of LeftSupramarginal
RAVLT_perc_forgetting 7.07e-02 1.224 1.684 2.319 0.762 0.012586 3.85 0.25 2 22 NA
M_ST24CV -1.02e-01 0.557 0.689 0.852 0.784 0.010169 3.50 0.15 2 31 Volume (Cortical Parcellation) of LeftEntorhinal
M_ST13CV -4.86e-13 0.682 0.786 0.907 0.787 -0.006338 3.28 0.15 1 7 Volume (Cortical Parcellation) of LeftBankssts
MMSE -3.99e-02 0.610 0.745 0.911 0.762 0.019400 2.76 0.10 3 12 NA
M_ST12SV -3.66e-02 0.581 0.711 0.869 0.762 0.022628 3.58 0.10 4 13 Volume (WM Parcellation) of LeftAmygdala
RD_ST15TS -5.97e-02 0.661 0.773 0.903 0.790 0.008388 3.36 0.10 5 7 Cortical Thickness Standard Deviation of LeftCaudalMiddleFrontal
M_ST26CV -1.95e-13 0.620 0.749 0.905 0.755 -0.017097 2.99 0.05 6 16 Volume (Cortical Parcellation) of LeftFusiform
M_ST39CV -9.17e-14 0.814 0.873 0.936 0.794 0.011278 3.83 0.05 7 12 Volume (Cortical Parcellation) of LeftMedialOrbitofrontal
M_ST59CV -1.68e-13 0.693 0.780 0.876 0.792 0.013338 4.16 0.05 8 7 Volume (Cortical Parcellation) of LeftSupramarginal
M_ST39SA -4.15e-14 0.904 0.940 0.978 0.783 0.007519 3.10 0.05 9 NA Surface Area of LeftMedialOrbitofrontal

1.2.2 Heat map


hm <- heatMaps(Outcome="status",data=TADPOLECrossMRI[,c("status",clusterFeatures)],title="Heat Map",Scale=TRUE,
                       theFiveColors=c("black","red","orange","yellow","white"),
#                      theFiveColors=c("darkred","red","yellow","blue","darkblue"),
                       hCluster="col",
                       cexRow=0.50,cexCol=0.65,srtCol=35,
                       ylab="Subjects",
                       xlab="Features"
                       )

1.2.3 Heat map


hm <- heatMaps(Outcome="status",data=TADPOLECrossMRI,title="Heat Map",Scale=TRUE,
                       theFiveColors=c("black","red","orange","yellow","white"),
#                      theFiveColors=c("darkred","red","yellow","blue","darkblue"),
                       hCluster="col",
                       cexRow=0.50,cexCol=0.5,srtCol=35,
                       ylab="Subjects",
                       xlab="Features"
                       )